using System;

using MVPComposibility.ContactManager.DomainModel;
using MVPComposibility.ContactManager.Views.ContactManager;
using WCSFContrib.Extensions.EventBroker;
using WCSFContrib.Extensions.Utility;

namespace MVPComposibility.ContactManager.Views.ContactDetails
{
	public interface IContactDetailsModel
	{
		event EventHandler ContactChanged;
		event EventHandler EditCompleted;

		Contact Contact { get; set; }

		void RestoreContactFromPersistentState(Contact c);

		Contact EditedContact { get; }

		void EditComplete();
		void EditCancel();

		[EventPublication(ContactManagerTopics.ContactNameChanged)]
		event EventHandler<DataEventArgs<NewContactName>> ContactNameChanged;

		[EventSubscription(ContactManagerTopics.Initialized)]
		void RestoreContact(Contact contact);

		[EventSubscription(ContactManagerTopics.SelectedContactChanged)]
		void SetSelectedContact(Contact contact);
	}
}